16.10.2010, 17:30
I made a /changespawn command so players can change there spawns but as it is a RP server I dont want it to be abused, I was thinking on setting a Timer for 24 hours.. How would I do it?
Also
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(listitem == 0)
{
SetPlayerPos(playerid, 1278.3571,168.0426,20.1642);
SendClientMessage(playerid, COLOR_ALERT, "SERVER: You will now spawn in Red County");
}
else if(listitem == 1)
{
SetPlayerPos(playerid, 80.4938,1164.2931,18.6565,358.8586);
SendClientMessage(playerid, COLOR_ALERT, "SERVER: You will now spawn in Fort Carson");
}
else if(listitem == 2)
{
SetPlayerPos(playerid, -92.8061,1227.8779,19.7422,178.0079);
SendClientMessage(playerid, COLOR_ALERT, "SERVER: You will now spawn in Fort Carson");
}
return 1;
}
return 1;
}
pawn Код:
if(!strcmp("/changespawn1", cmdtext, true, 13))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Changing your Spawn","Red County\nFort Carson 1\nFort Carson 2","Select","Cancel");
return 1;
}