Making one command multi
#1

I don't really know how to search for something like this when I do not know the name?

How do I make this I think a string?

For example /resetcar 1-4

pawn Код:
CMD:resetcar(playerid,params[])
{
    if(IsMuted(playerid))return 1;
    new id,Float:x,Float:y,Float:z,str[128];
    if(AdminLevel[playerid]<3)return 0;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,GREY,"USAGE: /resetcar [playerid]");
    if(Car[id]==0)return SendClientMessage(playerid,GREY,"That player doesn't own any car");
    GetPlayerPos(id,x,y,z);
    SetVehiclePos(Car[id],x,y+2,z);
    LinkVehicleToInterior(Car[id],GetPlayerInterior(playerid));
    SetVehicleVirtualWorld(Car[id],0);
    if(id!=playerid)
    {
        format(str,sizeof(str),"You have reset the vehicle position of %s's personal vehicle",PlayerName(id));
        SendClientMessage(playerid,YELLOW,str);
        SendClientMessage(id,YELLOW,"An Administrator has reset your personal vehicle's position");
    }
    if(id==playerid)
    {
        SendClientMessage(id,YELLOW,"You have reset your personal vehicle's position");
    }
    return 1;
}
Reply


Messages In This Thread
Making one command multi - by dillo1000 - 09.05.2015, 08:13
Re: Making one command multi - by Smileys - 09.05.2015, 13:47
Re: Making one command multi - by PSYCHOBABYKILLA - 09.05.2015, 14:45

Forum Jump:


Users browsing this thread: 1 Guest(s)