CMD:afk(playerid, params[])
{
SetPlayerPos(playerid, 322.197998,302.497985,999.148437);
SetPlayerInterior(playerid, 5);
SetPlayerHealth(playerid, 9999);
ResetPlayerWeapons(playerid);
new string[64];
format(string, sizeof string, "o Jogador (%s) Estб no /AFK", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
else{
SpawnPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
format(string, sizeof string, "o Jogador (%s) Saiu Do AFK /sairafk", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
}
return 1;
}
C:\Users\Usuario\Desktop\SV\gamemodes\TEST.pwn(930) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
PHP код:
PHP код:
|
new bool:AFK[MAX_PLAYERS];
CMD:afk(playerid)
{
new string[64];
if(!AFK[playerid])
{
SetPlayerPos(playerid, 322.197998,302.497985,999.148437);
SetPlayerInterior(playerid, 5);
SetPlayerHealth(playerid, 9999);
ResetPlayerWeapons(playerid);
AFK[playerid] = true;
format(string, sizeof string, "o Jogador (%s) Estб no /AFK", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
}
else
{
SpawnPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
AFK[playerid] = false;
format(string, sizeof string, "o Jogador (%s) Saiu Do AFK /sairafk", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
}
return 1;
}
//Topo do GM:
new bool:IsPlayerAFK[MAX_PLAYERS];
CMD:afk(playerid, params[]) {
if(isnull(params)) return SendClientMessage(playerid,cor_vermelho,"/afk [on/off]");
new string[64];
if(!strcmp(params,"on",true)) {
IsPlayerAFK[playerid] = true;
SetPlayerPos(playerid, 322.197998,302.497985,999.148437);
SetPlayerInterior(playerid, 5);
SetPlayerHealth(playerid, 9999);
ResetPlayerWeapons(playerid);
format(string, sizeof string, "o Jogador (%s) Estб no /AFK", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
else if(!strcmp(params,"off",true)) {
IsPlayerAFK[playerid] = false;
SpawnPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
format(string, sizeof string, "o Jogador (%s) Saiu Do AFK /sairafk", PlayerName(playerid));
SendClientMessageToAll(COR_ERRO, string);
}
return 1;
}