Whats wrong?
#1

After when someone dies and spawns, they lose 100 dollars. I tryed many things but it wont be fixed D:
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsSpecing[playerid] == 1)
    {
        SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
        SetPlayerInterior(playerid,Inter[playerid]);
        SetPlayerVirtualWorld(playerid,vWorld[playerid]);
        IsSpecing[playerid] = 0;
        IsBeingSpeced[spectatorid[playerid]] = 0;
    }
    new filo[256];
    format(filo,256,"org%d.ini",PlayerInfo[playerid][Member]);
    SetPlayerColor(playerid,HexToInt(dini_Get(filo,"Color")));
    GivePlayerWeapon(playerid,dini_Int(filo,"Wep1"),5000);
    GivePlayerWeapon(playerid,dini_Int(filo,"Wep2"),5000);
    GivePlayerWeapon(playerid,dini_Int(filo,"Wep3"),5000);
    if(PlayerInfo[playerid][Member] == -255)
    {
        SetPlayerColor(playerid,0xFFFFFFFF);
    }
    if(god[playerid] == 1)
    {
    SetPlayerHealth(playerid,100000);
    }
    spawned[playerid] = 1;
    SetPlayerPos(playerid,PlayerData[playerid][PosX],PlayerData[playerid][PosY],PlayerData[playerid][PosZ]+1);
    if(useskin[playerid] == 1) return SetPlayerSkin(playerid,PlayerData[playerid][Saveskin]);
    if(justconnected[playerid] == 1)
    {
        if(PlayerData[playerid][PosX] == 0 && PlayerData[playerid][PosY] == 0 && PlayerData[playerid][PosZ] == 0)
        {
            SetPlayerPos(playerid,1705.6431,1452.7920,10.8170);
            SetPlayerFacingAngle(playerid,268.1469);
            SetCameraBehindPlayer(playerid);
        }
    }
    format(str,sizeof(str),"You have $%d money in your wallet",GetPlayerMoney(playerid));
    SendClientMessage(playerid,0x0080C0FF,str);
    return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsBeingSpeced[playerid] == 1)
    {
        foreach(Player,i)
        {
            if(spectatorid[i] == playerid)
            {
                TogglePlayerSpectating(i,false);
            }
        }
    }
    spawned[playerid] = 0;
    GetPlayerPos(killerid,X,Y,Z);
    GetPlayerName(playerid,Nam,sizeof(Nam));
    GetPlayerName(killerid,pname, sizeof(pname));
    GetWeaponName(reason,WeapName,32);
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i,10,X,Y,Z))
        {
            format(str,sizeof(str),"%s has been killed by %s. Weapon: %s",Nam,pname,WeapName);
            SendClientMessage(i,orange,str);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Whats wrong? - by Tanush123 - 14.12.2011, 01:13
Re: Whats wrong? - by Lilcuete - 14.12.2011, 01:37
Re: Whats wrong? - by Ballu Miaa - 14.12.2011, 01:43
Re: Whats wrong? - by d1ablo - 14.12.2011, 02:02
Re: Whats wrong? - by Tanush123 - 14.12.2011, 02:13
Re: Whats wrong? - by suhrab_mujeeb - 14.12.2011, 02:17
Re: Whats wrong? - by Ballu Miaa - 14.12.2011, 02:20
Re: Whats wrong? - by Steven82 - 14.12.2011, 02:33
Re: Whats wrong? - by suhrab_mujeeb - 14.12.2011, 02:39
Re: Whats wrong? - by Rob_Maate - 14.12.2011, 03:19

Forum Jump:


Users browsing this thread: 3 Guest(s)