Need small fixes with my event commands - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need small fixes with my event commands (
/showthread.php?tid=580248)
Need small fixes with my event commands -
Sc0pion - 03.07.2015
Fixed!
Re: Need small fixes with my event commands -
Sc0pion - 04.07.2015
Fixed!
Re: Need small fixes with my event commands -
PMH - 04.07.2015
pawn Код:
if(!EventOpen == 2) return SCM(playerid, -1 ,"Event has to be started in order to use this command");
ident ur code, too hard for others to read/understand it.
http://courses.cs.washington.edu/cou...au/indent.html << if u're too lazy
PHP код:
if(strcmp(cmd, "/eventteleport", true) == 0)
{
if(AccInfo[playerid][LoggedIn] == 1 && AccInfo[playerid][Level] >=2)
{
new PlayerName[MAX_PLAYER_NAME], string[256];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
GetPlayerPos(playerid, x, y, z);
SendClientMessage(playerid, BlueMsg, "[ NOTIFICATION: You have teleported all event participants to your position. ]");
SendCommandToAdmins(playerid,"EventTeleport");
format(string,sizeof(string),"[ ADMIN: %s (Id: %d) has teleported every event participants to his/her position. ]",PlayerName,playerid);
SendClientMessageToAll(COLOR_PINK,string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerVirtualWorld(i)== 9999) //why are u checking this doe?
{
SetPlayerPos(i, x, y, z);
SetPlayerInterior(i, GetPlayerInterior(playerid));
}
}
return 1;
}
else SendClientMessage(playerid,red, "[ ERROR: You have entered an invalid command, please type /cmds to know the server's commands. ]");
}
}
give this one a try? maybe they had a different interior
Re: Need small fixes with my event commands -
Sc0pion - 04.07.2015
Fixed!