SA-MP Forums Archive
how can i reset pple's weapon+money+car? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how can i reset pple's weapon+money+car? (/showthread.php?tid=243055)



how can i reset pple's weapon+money+car? - [ProX]BlueFire - 21.03.2011

the title say all....


Re: how can i reset pple's weapon+money+car? - PinkFloydLover - 21.03.2011

ResetPlayerWeapons
ResetPlayerMoney

for the vehicle you can use,

DestroyVehicle(GetPlayerVehicleID);


Re: how can i reset pple's weapon+money+car? - Davz*|*Criss - 21.03.2011

Reset Weapons

pawn Code:
COMMAND:resetweaps(playerid, params[])
{
    for(new z = 0; z < MAX_PLAYERS; z += 1) { ResetPlayerWeapons(); }
    SendClientMessage(playerid, 0xffff00aa, "All players weapons has been resetted.");
    return 1;
}
Reset Money

pawn Code:
COMMAND:resetmoney(playerid, params[])
{
    for(new z = 0; z < MAX_PLAYERS; z += 1) { ResetPlayerMoney(); }
    SendClientMessage(playerid, 0xffff00aa, "All players money has been restored.");
    return 1;
}
Reset Vehicles

pawn Code:
CMD:resetveh(playerid, params[])
{
    new Unusedcar[MAX_VEHICLES];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(IsPlayerInAnyVehicle(i))
                {
                    Unused[GetPlayerVehicleID(i)]=1;
                }
            }
        }
        for(new carid = 0; carid < MAX_VEHICLES; carid++)
        {
            if(unused[carid]==0)
            {
                SetVehicleToRespawn(carid);
            }
        }
return 1;
}

Thanks, I did not tested if it does not work.


Re: how can i reset pple's weapon+money+car? - [ProX]BlueFire - 21.03.2011

thx dude