31.08.2012, 03:00
Quote:
That code is kinda useless because you did not used it in the /drag command.
And just add new coords in the /drag command. And if your drag map is big,go to different places and do /save [name] and use the pawn Код:
|
here's the whole code for ya
pawn Код:
CMD:drag(playerid, params[])
{
if(GetPVarInt(playerid, "CMDDisabled") != 0)
{
ShowPlayerDialog(playerid, DIALOG_EVADE, DIALOG_STYLE_MSGBOX, "Leave Menu", "You must Leave first before using this command", "Leave", "Cancel");
return 1;
}
SetCameraBehindPlayer(playerid);
SetPlayerFacingAngle( playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 3);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "{6666FF}(/drag) {00CCFF}%s {6666FF}has Teleported to Drag Area",pName);
SendClientMessageToAll(0xFFFFFFFF, string);
}
else
{
if(IsPlayerInAnyVehicle(playerid);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "{6666FF}(/drag) {00CCFF}%s {6666FF}has Teleported to Drag Area",pName);
SendClientMessageToAll(0xFFFFFFFF, string);
new veh = GetPlayerVehicleID(playerid);
SetPlayerHealth(playerid, 100);
SetVehicleZAngle(veh, 0);
SetCameraBehindPlayer(playerid);
LinkVehicleToInterior(veh, 0);
SetCameraBehindPlayer(playerid);
SetVehicleVirtualWorld(veh, 3);
PutPlayerInVehicle(playerid, veh, 0);
}
pInEvent[playerid] = 1;
SetPVarInt(playerid, "CMDDisabled", 2);
new Random = random(sizeof(RandomSpawnDrag));
SetPlayerPos(playerid, RandomSpawnDrag[Random][0], RandomSpawnDrag[Random][1], RandomSpawnDrag[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawnDrag[Random][3]);
DragCurrentRCP[playerid] = 1;
SetPlayerRaceCheckpoint(playerid, 0, DragRCP[0][0], DragRCP[0][1], DragRCP[0][2], DragRCP[1][0], DragRCP[1][1], DragRCP[1][2], 15);
return GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Drag Area",2000,3);
}