3 problems
#10

1st error
pawn Код:
COMMAND:pslap(playerid,params,cmdtext[])
{
    if(isprem[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_RED, "You arent a premium member"); return 1;
    }
    else
    {
        new sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
        new string [128];
        if(!strlen(params))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pslap [playerid]");
            return 1;
        }
        else
        {
            new otherplayer = strval(params);
              GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(otherplayer, giveplayer, sizeof(giveplayer));
                new Float:X, Float:Y, Float:Z;
                GetPlayerPos(otherplayer, X, Y, Z);
                SetPlayerPos(otherplayer, X, Y, Z+10);
                format(string, sizeof(string), "\"%s\" was slapped by Admin \"%s\".", giveplayer, sendername);
                SendClientMessageToAll(COLOR_YELLOW, string);
        }
    }
    return 1;
}
2nd problem

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(GetPlayerVehicleID(playerid) == 520)
        {
            if(isprem[playerid] == 0 || !IsPlayerBAdmin(playerid))
            {
                SendClientMessage(playerid, COLOR_RED, "To fly the hydra you must be an administrator or premium member.");
                RemovePlayerFromVehicle(playerid); return 1;
            }
            SendClientMessage(playerid, COLOR_YELLOW, "You enter the Admin/Premium Hydra.");
            return 1;
        }
        else if(GetPlayerVehicleID(playerid) == 447)
        {
            if(isprem[playerid] == 0 || !IsPlayerBAdmin(playerid))
            {
                SendClientMessage(playerid, COLOR_RED, "To fly the seasparrow you must be an administrator or premium member.");
                RemovePlayerFromVehicle(playerid); return 1;
            }
            SendClientMessage(playerid, COLOR_YELLOW, "You enter the Admin/Premium Seasparrow.");
            return 1;
        }
    }
    return 1;
}
3rd problem

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(isprem[playerid])
    {
        SetPlayerArmour(playerid, 100);
        PlayerPlaySound(playerid, 1098,-119.9460,23.1096,12.2238);
        SetPlayerCheckpoint(playerid, 268.7881,1884.0446,-30.0938,5);
        if(GetPlayerSkin(playerid) == 98)
        {
            GivePlayerWeapon(playerid, WEAPON_DEAGLE,500);
            GivePlayerWeapon(playerid, WEAPON_UZI,500);
        }
    }
    return 1;
}
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == 98)
   {
       SendClientMessage(playerid, COLOR_RED, "This skin is donator only!");
       return 0;
   }
   return 1;
}
Reply


Messages In This Thread
3 problems - by [NTX]MikeQ - 16.07.2010, 12:16
Re: 3 problems - by [NTX]MikeQ - 16.07.2010, 12:17
Re: 3 problems - by [NTX]MikeQ - 16.07.2010, 12:20
Re: 3 problems - by armyoftwo - 16.07.2010, 12:20
Re: 3 problems - by [NTX]MikeQ - 16.07.2010, 12:29
Re: 3 problems - by RichyB - 16.07.2010, 12:32
Re: 3 problems - by [NTX]MikeQ - 16.07.2010, 12:34
Re: 3 problems - by RichyB - 16.07.2010, 12:40
Re: 3 problems - by [NTX]MikeQ - 16.07.2010, 13:03
Re: 3 problems - by [HiC]TheKiller - 16.07.2010, 13:12

Forum Jump:


Users browsing this thread: 1 Guest(s)