04.11.2014, 10:26
Did i do it correctly ?
Cause i am having two errors
Line
PHP код:
CMD:afk(playerid, params[])
{
if(IsPlayerAfk[playerid] == 1) return SendClientMessage(playerid, -1, "{FF0000}[SERVER]{FFFFFF}: You are already AFK");
IsPlayerAfk[playerid] = 1;
for (new i = 0; i <= 12; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
SetPlayerHealth(playerid, 99999999999999999999999999999999999999999999999999999999999.0);
GetPlayerPos(playerid, gPos[playerid][0], gPos[playerid][1], gPos[playerid][2]);
SetPlayerPos(playerid, 1812.0895,-1288.2290,114.9564);
SendClientMessage(playerid, -1, "{00CC00}You have been sent to AFK zone");
SetPlayerVirtualWorld(playerid, 1);
ResetPlayerWeapons(playerid);
return 1;
}
CMD:back(playerid,params[])
{
if(IsPlayerAfk[playerid] == 0) return SendClientMessage(playerid, -1, "{FF0000}[SERVER]{ffffff}: You are not AFK");
if(IsPlayerAfk[playerid] == 1)
{
IsPlayerAfk[playerid] = 0;
for (new i = 0; i <= 12; i++)
{
GivePlayerWeapon(playerid, i, weapons[i][0], weapons[i][1]);
}
SendClientMessage(playerid, -1,"{FF0000}[SERVER]{FFFFFF}: You are back from AFK");
SetPlayerPos(playerid, gPos[playerid][0], gPos[playerid][1], gPos[playerid][2]);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100);
}
return 1;
}
return 0;
}
PHP код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(527) : warning 202: number of arguments does not match definition
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(536) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
PHP код:
GivePlayerWeapon(playerid, i, weapons[i][0], weapons[i][1]);
PHP код:
return 0;