Sigh i dont know where to put for(new i; i < MAX_PLAYERS; i++)
#1

The place i put it making the pawn not compile its not even getting errors just blank sigh....

if(strcmp(cmd, "/fishslap", true) == 0)
{
tmp = strtok(cmdtext, idx);
new targetid = strval(tmp);
for (new i = i; i < MAX_PLAYERS; i++)
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "[ERROR]: That player is not connected !");

if(gTeam[playerid] == CIVILIAN || gTeam[playerid] == GAZA)
{

if(playerid != targetid)
{

if (GetDistanceBetweenPlayers(playerid, targetid) <= 4)

if(IsPlayerSpawned(playerid))
{
if(IsPlayerSpawned(targetid))
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(!IsPlayerInAnyVehicle(targetid))
{
new Float:health;
new Float, Float:y, Float:z, string[100];
if(GetPVarInt(playerid,"CMDABUSE1")>GetTickCount() ) return SendClientMessage(playerid,0xFF0000AA,"Please Wait Before Fish Slapping Someone Again.");
SetPVarInt(playerid,"CMDABUSE1",GetTickCount()+600 00);
GetPlayerPos(targetid, x, y, z);
SetPlayerPos(targetid, x, y, z+1.5);
GetPlayerHealth(targetid,health);
SetPlayerHealth(targetid, health-5);
PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
PlayerPlaySound(targetid,1190,0.0,0.0,0.0);
format(string, 100, "You have Used Fishslap", name, playerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(targetid,0xFF0000AA,"You Have Been Fishslapped.");
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel (playerid)+ 1);
return true;
}
else
{
new errormsg[250];
new blown[MAX_PLAYER_NAME];
GetPlayerName(strval(tmp), blown, sizeof(blown));
format(errormsg, sizeof(errormsg), "%s[ID:%d] is in a Vehicle. You cannot fishslap the person inside a vehicle.", blown, strval(tmp));
SendClientMessage(playerid, ERROR, errormsg);
return true;
}
}
else return SendClientMessage(playerid, ERROR, "You cannot fishslap anyone from inside a vehicle.");
}
else
{
new errormsg[250];
new blown[MAX_PLAYER_NAME];
GetPlayerName(strval(tmp), blown, sizeof(blown));
format(errormsg, sizeof(errormsg), "%s[ID:%d] is dead.", blown, strval(tmp));
SendClientMessage(playerid, ERROR, errormsg);
return true;
}
}
else return SendClientMessage(playerid,0xFF0000AA,"Cannot Fishslap When Your Dead.");
}
else return SendClientMessage(playerid,0xFF0000AA,"Nobody Is Close Enough To Fishslap.");
}
else return SendClientMessage(playerid,0xFF0000AA,"You Cannot Slap YourSelf!");
}
else return SendClientMessage(playerid,0xFF0000AA,"Only Civilians Can Fishslap People.");
}
Reply
#2

Use "[pawn]" code.
Reply
#3

You don't even need to add that piece of code.
Reply
#4

sry for my lag of script knowledge but how i putting in as [pawn]code lolz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)