if(strcmp(cmd, "/party", true) == 0)
{
if (AccountInfo[playerid][AdminLevel] > 3 || IsPlayerAdmin(playerid))
{
SendClientMessageToAll(0xDEEE20FF, "PARTY TIME! YEHAA!");
GetPlayerPos(i,pX,pY,pZ);
SetPlayerPos(i,pX,pY,pZ+5);
SetPlayerInterior(i, 3);
SetPlayerPos(playerid,-2637.69,1404.24,906.46);
ResetPlayerWeapons(i);
}
else SendClientMessage(playerid, RED, "No party for you");
return 1;
}
|
Originally Posted by Mo3
PS: Is there a callback to disable interior exits? If yes, Iґd like to have that implemented.
|
for (new i = 0; i < MAX_PLAYERS; i++)
{
// do something with current player (which is 'i')
}
new i = 0;
while (i < MAX_PLAYERS)
{
// do something with current player (which is 'i')
i++;
}
new i = 0;
do
{
// do something with current player (which is 'i')
i++;
}
while (i<MAX_PLAYERS)
if(strcmp(cmd, "/party", true) == 0) // Will make the player invinsible until death
{
if (AccountInfo[playerid][AdminLevel] > 3 || IsPlayerAdmin(playerid))
{
for (new i = 0; i < MAX_PLAERS; i++)
{
SendClientMessageToAll(0xDEEE20FF, "PARTY TIME! YEHAA!");
GetPlayerPos(i,pX,pY,pZ);
SetPlayerPos(i,pX,pY,pZ+5);
SetPlayerInterior(i, 3);
SetPlayerPos(i,-2637.69,1404.24,906.46);
ResetPlayerWeapons(i);
DisableInteriorEnterExits();
}
}
else SendClientMessage(playerid, RED, "No party for you");
return 1;
}
if(strcmp(cmd, "/party", true) == 0) // Will make the player invinsible until death
{
if (AccountInfo[playerid][AdminLevel] > 3 || IsPlayerAdmin(playerid))
{
new i = 0;
while (i < MAX_PLAYERS)
{
SendClientMessageToAll(0xDEEE20FF, "PARTY TIME! YEHAA!");
if(IsPlayerInVehicle(i, true))
{
GetPlayerPos(playerid,pX,pY,pZ);
SetPlayerPos(playerid,pX,pY,pZ+5);
}
SetPlayerInterior(i, 3);
SetPlayerPos(i,-2637.69,1404.24,906.46);
ResetPlayerWeapons(i);
DisableInteriorEnterExits();
i++;
}
}
else SendClientMessage(playerid, RED, "No party for you");
return 1;
}