25.03.2012, 22:31
Hi, I have a problem with a lot of commands. Happens that if you type for example "/slap" the command runs good, but in one part say "Unknown command", I don't know why happen that.
So, here's the command
That happen with another command too (/are - accept report)
Sorry for the English, I'm learning.
So, here's the command
pawn Код:
COMMAND:slap(playerid,params[])
{
if(Informacion[playerid][Admin] >= 2)
{
new id;
if(sscanf(params,"u",id))
{
if(Informacion[id][Idioma]==0) SendClientMessage(playerid,-1,"Usa: {FF0000}/bofetear {FFFFFF}[ID/Nombre]");
if(Informacion[id][Idioma]==1) SendClientMessage(playerid,-1,"Use: {FF0000}/slap {FFFFFF}[ID/Name]");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Jugador no conectado");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(id,X,Y,Z);
SetPlayerPos(id,X,Y,Z+15);
GameTextForPlayer(id,"~r~SLAP!",5000,4);
new st[128 char];
format(st,128,"Has bofeteado a {FF0000}%s (%d)",pNick(id),id);
SendClientMessage(playerid,-1,st); //all is good here - the message is displayed
PlayerPlaySound(id,1190,0.0,0.0,0.0); //HERE IS THE PROBLEM. No sound is played
}
return 1;
}
Sorry for the English, I'm learning.