All pastes #538536 Raw Edit

Mine

public text v1 · immutable
·published 2007-06-05 01:45 UTC
rendered paste body
#include <a_samp>

// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOR_WHITE 0xFFFFFFAA
new adminspawn[MAX_PLAYERS];
new playerskin[MAX_PLAYERS];
dcmd_as4(playerid, params[]){
	new idx, string[256];
	if(!IsPlayerAdmin(playerid)){
	return 1;
	}
	string = strtok(params, idx);
	if(!strlen(string)) {
		SendClientMessage(playerid, COLOR_WHITE, "USAGE: /as4 location(lv,sf,ls)");
		return 1;
	}
	adminspawn[playerid] = 1;
 	for (new i=1; i<=18; i++) {
		SetVehicleParamsForPlayer(i, playerid, 0, 0);
	}
	playerskin[playerid] = GetPlayerSkin(playerid);
	if (!strcmp(string,"ls",true)) { SetSpawnInfo(playerid, 255, playerskin[playerid], 1871.0000, -1633.0000, 32.0000, 90.0000, 22, 999999, 28, 999999, 31, 999999); }
	if (!strcmp(string,"sf",true)) { SetSpawnInfo(playerid, 255, playerskin[playerid], -2150.0000, 252.0000, 56.4000, 90.0000, 22, 999999, 28, 999999, 31, 999999); }
	if (!strcmp(string,"lv",true)) { SetSpawnInfo(playerid, 255, playerskin[playerid], 2170.1453, 1677.9929, 20.3906, 90.0000, 22, 999999, 28, 999999, 31, 999999); }
	SetPlayerColor(playerid, 0xFFFFFFAA);
	SpawnPlayer(playerid);
	return 1;
}

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	dcmd(as4,3,cmdtext);
	return 0;
}

strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}