Commands problem
#3

Код:
if(!strcmp(cmd, "/setscore",true) == 0) 
    { 
  { 
  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"You are not an admin !"); 
  new targetid, score, string[128]; 
  if(sscanf(params, "uz", targetid,score)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setscore [playerid/partofname] [score]"); 
  if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Player not connected!"); 
  else 
  { 
  SetPlayerScore(targetid, score); 
  format(string,sizeof(string),"an Admin has changed your Score to %s ", score); 
  SendClientMessage(targetid, 0xA10000AA, string); 
  } 
  } 
  return 1; 
}
Код:
if(!strcmp(cmd, "/asay1",true) == 0) 
    { 
  { 
  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"You are not an admin !"); 
  new text[128]; 
  if(sscanf(params, "s[128]",text)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /asay [text]"); 
  else 
  { 
  new string[128]; 
  new pName[128]; 
  GetPlayerName(playerid,pName,128); 
  format(string,sizeof string,"[ADMIN]%s: %s",pName,text); 
  SendClientMessageToAll(0xA10000AA,string); 
  } 
  } 
  return 1; 
}
Reply


Messages In This Thread
Commands problem - by Soumi - 19.03.2011, 14:57
Re: Commands problem - by iJumbo - 19.03.2011, 14:58
Re: Commands problem - by bijoyekuza - 19.03.2011, 14:59
Re: Commands problem - by iJumbo - 19.03.2011, 15:01
Re: Commands problem - by Roomeo - 19.03.2011, 15:01
Re: Commands problem - by bijoyekuza - 19.03.2011, 15:07
Re : Commands problem - by Soumi - 19.03.2011, 15:21
Re: Commands problem - by bijoyekuza - 19.03.2011, 15:23
Re : Commands problem - by Soumi - 19.03.2011, 15:30
Re: Commands problem - by Rivera - 19.03.2011, 16:51

Forum Jump:


Users browsing this thread: