Money Problems
#6

PHP код:
CMD:rescue(playeridparams[])
{
    if ((
GetPlayerState(playerid) == PLAYER_STATE_WASTED) || GetPlayerState(playerid) == PLAYER_STATE_NONE) return 0;
    if(
GetPlayerTeam(playerid) == TEAM_TRUCKER)
    {
       new 
rand random(sizeof(TruckerSpawn));
       
SetPlayerPos(playeridTruckerSpawn[rand][SpawnX], TruckerSpawn[rand][SpawnY], TruckerSpawn[rand][SpawnZ]);
       
SetPlayerFacingAngle(playeridTruckerSpawn[rand][SpawnAngle]);
    }
    if(
GetPlayerTeam(playerid) == TEAM_COP)
    {
       new 
rand random(sizeof(CopSpawn));
       
SetPlayerPos(playeridCopSpawn[rand][SpawnX], CopSpawn[rand][SpawnY], CopSpawn[rand][SpawnZ]);
       
SetPlayerFacingAngle(playeridCopSpawn[rand][SpawnAngle]);
    }
    
SetPlayerVirtualWorld(playerid1);
    
Loadingmap(playerid);
    
SendClientMessage(playeridCOLOUR_YELLOW"You been rescued!");
    
SetCameraBehindPlayer(playerid);
    
GivePlayerMoney(playerid, -300); // Add it work?
    //PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - 300;
    
return 1;

Reply


Messages In This Thread
Money Problems - by DerickClark - 22.08.2015, 15:14
Re: Money Problems - by Logofero - 22.08.2015, 15:31
Re: Money Problems - by DerickClark - 22.08.2015, 15:37
Re: Money Problems - by Logofero - 22.08.2015, 15:42
Re: Money Problems - by DerickClark - 22.08.2015, 15:45
Re: Money Problems - by Logofero - 22.08.2015, 15:53
Re: Money Problems - by DerickClark - 22.08.2015, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)