How do i make a player get certain weapons when he teles to a place?
#1

Hello,
How do i make a player get certain weapons when he teles to a place? Eg, if i did swat teleport i would get a SMG with 1000 ammo ?

thanks
Reply
#2

under or above "SetPlayerPos(...)" in the tele command just add GivePlayerWeapon(playerid,weaponid,ammo)
Reply
#3

Ok but how do i add multiple weapons?
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/House", cmdtext, true, 10) == 0)
    {
    SetPlayerPos(playerid, X, Y, Z);
    GivePlayerWeapon(playerid,[weaponid],[ammo]);
        return 1;
    }
    return 0;
}
Replace X, Y, Z with your saved positions..
something like that
For More weapons keep adding :
Replace [weapon id] [ammo]
pawn Код:
GivePlayerWeapon(playerid,[weaponid],[ammo]);
Reply
#5

Thanks alot
Reply
#6

Quote:
Originally Posted by rohan234
Thanks alot
yw
if u need more help just ask or pm me
Reply
#7

Afaik you could read it all at SAMP Wiki..
Next time search it and try to understand the Pawn-linguage.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)