What the wrong here?
#1

Help me Plesae when I go Robbery anything i'll got all weapons From checkpoints so what to do For fix this?

PHP код:
public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
checkpointid == SWAT)
    if(
GetPlayerSkin(playerid) != 285) return SendClientMessage(playerid, -1"{FF0000}Sorry This Place only For SWAT, you are not SWAT");
    {
    
GivePlayerWeapon(playerid2465);
    
GivePlayerWeapon(playerid26150);
    
GivePlayerWeapon(playerid31150);
    
GivePlayerWeapon(playerid3450);
    
SetPlayerArmour(playerid100);
    
SetPlayerHealth(playerid100);
    
SendClientMessage(playerid, -1"{FF0000}You have been Refill Come Back After you Dead");
    
GameTextForPlayer(playerid"You have been Refiled!!"40005); //It will show this if a player steps in the checkpoint
    
return 1;
    }
    if(
checkpointid == COPS[1])
    if(
GetPlayerSkin(playerid) != 287) return SendClientMessage(playerid, -1"{FF0000}Sorry This Place Only For Army, you are not army");
    {
    
GivePlayerWeapon(playerid2765);
    
GivePlayerWeapon(playerid30100);
    
GivePlayerWeapon(playerid2465);
    
GivePlayerWeapon(playerid163);
    
GivePlayerWeapon(playerid29250);
    
SetPlayerArmour(playerid75.00);
    
GameTextForPlayer(playerid"~g~Refild"40005);
    
SendClientMessage(playerid, -1"{FF0000}You have been Refiled Come Back After you Dead");
    return 
1;
    }
    if(
checkpointid == ARMY[2])
    if(
GetPlayerSkin(playerid) != 280) return SendClientMessage(playerid, -1"{FF0000}Sorry This Place only for Police Offier, You are not Police");
    {
    
GivePlayerWeapon(playerid2437);
    
GivePlayerWeapon(playerid3330);
    
GivePlayerWeapon(playerid29150);
    
GivePlayerWeapon(playerid3035);
    return 
1;
    }
    if(
checkpointid == MDEIC[3])
    if(
GetPlayerSkin(playerid) == 277) return SendClientMessage(playerid, -1"{FF0000}Sorry This Refill only for Firefighter, You are not FireMan");
    {
    
GivePlayerWeapon(playerid4299999);
    
SendClientMessage(playerid, -1"{FF0000}You have been Refiled, Come Back After you Dead");
    
GameTextForPlayer(playerid"~g~Refiled"40005);
    return 
1;
    }

Is there anything not done? Please Check the CASE If worked or not..
Reply
#2

You are missing the opening and closing brackets on the if statements. ( tbe "{" "}" )
Reply
#3

Quote:
Originally Posted by Runn3R
Посмотреть сообщение
You are missing the opening and closing brackets on the if statements. ( tbe "{" "}" )
What do you mean? can u understand me? or give me more info or Example?

EDITED: ( tbe "{" "}" ) ?? What do you mean of it
Reply
#4

pawn Код:
if(somevar == someval)
{
}
Reply
#5

Sorry man, still not work....
Reply
#6

You should use return 1; ?
Reply
#7

I wouldn't return anything at the end...

Where are you handling the robbery cp?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)