/skin command
#7

Quote:
Originally Posted by Arthur_K
Посмотреть сообщение
I don't use ZCMD, Can you make 1 with strcmp?
Ok
pawn Код:
#include <sscanf2>
public OnPlayerCommandText(playerid,cmdtext[])
{
  if(strcmp(cmdtext,"/skin",true)== 0)
  {
    new id;
    if(sscanf(cmdtext,"i",id)) return SendClientMessage(playerid,COLOR_RED,"USAGE : /skin id \nCost : $20000");
    if(id<0 || id>299) return SendClientMessage(playerid,COLOR_RED,"Invalid ID : Usable ID 0-299");
    if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid,COLOR_RED,"Min amount needed is 20000$");
    SetPlayerSkin(playerid,id);
    GivePlayerMoney(playerid,-20000);
    new msg[50];
    format(msg,sizeof(msg),"Your skin has been set to ID %d",id);
    return SendClientMessage(playerid,-1,msg);
  }
  return 0;
}
Reply


Messages In This Thread
/skin command - by Arthur_K - 02.08.2012, 04:27
Re: /skin command - by [MM]RoXoR[FS] - 02.08.2012, 04:58
Re: /skin command - by [KHK]Khalid - 02.08.2012, 05:02
Re: /skin command - by Arthur_K - 02.08.2012, 05:02
Respuesta: Re: /skin command - by HarlemSAMP - 02.08.2012, 05:03
Re: /skin command - by Arthur_K - 02.08.2012, 05:04
Re: /skin command - by [MM]RoXoR[FS] - 02.08.2012, 05:13

Forum Jump:


Users browsing this thread: 5 Guest(s)