sscanf2 issue
#4

better use zcmd...
pawn Код:
dcmd_wank(playerid,params[])
{
    if(!IsPlayerConnected(playerid)) return 1;
    new string[128],ID,aName[MAX_PLAYER_NAME],Name[MAX_PLAYER_NAME],Float:x,Float:y,Float:z;
    GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerName(ID,aName,sizeof(aName));
    GetPlayerPos(playerid,x,y,z);
    if(sscanf(params,"u",ID))
    {
        format(string,sizeof(string),"%s (%d) wanks on himself.",Name,playerid);
        SendClientMessageToAll(white,string);
        ApplyAnimation(playerid,"PAULNMAC","wank_out",4.1,1,1,1,1,1,1);
    }
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,red,"Invalid ID");
    if(IsPlayerInRangeOfPoint(ID,5,x,y,z))
    {
        format(string,sizeof(string),"%s (%d) wanks on %s (%d).",Name,playerid,aName,ID);
        SendClientMessageToAll(white,string);
        ApplyAnimation(playerid,"PAULNMAC","wank_out",4.1,1,1,1,1,1,1);
        // thoug there is needed animation for player `ID`
    } else return SendClientMessage(playerid,red,"Player is not close enough");
    return 1;
}
this should work.
Reply


Messages In This Thread
sscanf2 issue - by willsuckformoney - 07.11.2010, 02:20
Re: sscanf2 issue - by GaGlets(R) - 07.11.2010, 02:40
Re: sscanf2 issue - by willsuckformoney - 07.11.2010, 02:43
Re: sscanf2 issue - by GaGlets(R) - 07.11.2010, 03:05
Re: sscanf2 issue - by willsuckformoney - 07.11.2010, 03:15
Re: sscanf2 issue - by GaGlets(R) - 07.11.2010, 03:19
Re: sscanf2 issue - by Nomine - 08.11.2010, 13:10
Re: sscanf2 issue - by GaGlets(R) - 08.11.2010, 23:32
Re: sscanf2 issue - by willsuckformoney - 08.11.2010, 23:40
Re: sscanf2 issue - by GaGlets(R) - 08.11.2010, 23:54

Forum Jump:


Users browsing this thread: 1 Guest(s)