How can I reset weapon, what's player holding?
#3

Quote:
Originally Posted by Maro06
Посмотреть сообщение
PHP код:
dcmd_disarm(playerid,params[])
{
    new 
string[128];
    new 
ID;
    if(
sscanf(params,"u",ID))
    {
        
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /disarm (Player Name/ID)");
        return 
1;
    }
    if(
IsSpawned[ID] == 0)
    {
        
format(string,sizeof(string),"%s(%d) is must be alive and spawned in order to give them a weapon.",PlayerName(ID),ID);
        
SendClientMessage(playerid,COLOR_ERROR,string);
        return 
1;
    }
    if(!
IsPlayerConnected(ID))
    {
        
format(string,sizeof(string),"The Player ID (%d) is not connected to the server.",ID);
        
SendClientMessage(playerid,COLOR_ERROR,string);
        return 
1;
    }
    
ResetPlayerWeapons(ID);
    
format(string,sizeof(string),"[ADMIN ACTION]%s(%d) Disarmed you.",PlayerName(playerid),playerid);
    
SendClientMessage(ID,COLOR_ERROR,string);
    
format(string,sizeof(string),"[ADMIN ACTION]You Disarmed %s(%d).",PlayerName(ID),ID);
    
SendClientMessage(playerid,COLOR_ERROR,string);
    return 
1;

Maybe Command Like This?
+ REP If helped
Sir you don't know , he said a function that removes a weapon

Simple Function I made
pawn Код:
stock RemoveSpecificWeapon(playerid, weaponid)
    return GivePlayerWeapon(playerid, weaponid, 0);


//Simple Command how to use 'RemoveSpecificWeapon' function

CMD:dropmp5(playerid, params[])
{
    RemoveSpecificWeapon(playerid, mp5weaponid);
    return 1;
}
Reply


Messages In This Thread
How can I reset weapon, what's player holding? - by Riwerry - 14.11.2013, 20:44
Re: How can I reset weapon, what's player holding? - by Ghazal - 14.11.2013, 20:45
Re: How can I reset weapon, what's player holding? - by Patrick - 14.11.2013, 20:47
Re: How can I reset weapon, what's player holding? - by Riwerry - 14.11.2013, 20:48
Re: How can I reset weapon, what's player holding? - by Kingunit - 14.11.2013, 20:56
Re: How can I reset weapon, what's player holding? - by Riwerry - 14.11.2013, 20:59
Re: How can I reset weapon, what's player holding? - by Jefff - 14.11.2013, 21:03
Re: How can I reset weapon, what's player holding? - by Riwerry - 14.11.2013, 21:14

Forum Jump:


Users browsing this thread: 1 Guest(s)