09.01.2011, 12:52
I search the whole sa-mp website for these cmds ... but it's not working ... i mean ... just correct them without any includes and admin levels, because i dont need admin levels in my server ^^
BTW: i have tried to correct them, but i get errors then ...
plz reply and fixx plzzz ;pp
pawn Код:
if(strcmp(cmd, "/akill", true) == 0)
{
if(level <= 3) return 0; //must delete ! (dont have admin levels !!)
if(pInfo[playerid][Logged] != 1)
return 0;
cmd = strtok(cmdtext, x);
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* Syntax: /akill [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return RtnError(playerid, 0xFF0000AA, "* Jinkies! You entered an invalid playerid dude!");
SetPlayerHealth(strval(cmd),0);
format(tmp,sizeof(tmp),"* You have successfully e-killed %s.",Name(strval(cmd)));
SendClientMessage(playerid,0x119900AA,tmp);
format(tmp,sizeof(tmp),"* Admin[%s] has just e-killed you!",Name(playerid));
SendClientMessage(strval(cmd),0x119900AA,tmp);
GameTextForPlayer(playerid,"~g~Success",4000,6);
return 1;
}
if(strcmp(cmd, "/goto", true) == 0)
{
if(level <= 3) return 0; //must delete ! (dont have admin levels !!)
if(pInfo[playerid][Logged] != 1)
return 0;
cmd = strtok(cmdtext, x);
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* Syntax: /goto [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return RtnError(playerid, 0xFF0000AA, "* Jinkies! You entered an invalid playerid dude!");
new Float:Pos[3];
GetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]);
SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]+5);
format(tmp,sizeof(tmp),"* You have successfully teleported to %s.",Name(strval(cmd)));
SendClientMessage(playerid,0x119900AA,tmp);
format(tmp,sizeof(tmp),"* Admin[%s] has just teleported to your head!",Name(playerid));
SendClientMessage(strval(cmd),0x119900AA,tmp);
GameTextForPlayer(playerid,"~g~Success",4000,6);
return 1;
}
if(strcmp(cmd, "/gethere", true) == 0)
{
if(level <= 3) return 0; //must delete ! (dont have admin levels !!)
if(pInfo[playerid][Logged] != 1)
return 0;
cmd = strtok(cmdtext, x);
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* Syntax: /gethere [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return RtnError(playerid, 0xFF0000AA, "* Jinkies! You entered an invalid playerid dude!");
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
SetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]+5);
format(tmp,sizeof(tmp),"* You have successfully teleported %s to you.",Name(strval(cmd)));
SendClientMessage(playerid,0x119900AA,tmp);
format(tmp,sizeof(tmp),"* Admin[%s] has just teleported you to him! Get it on!",Name(playerid));
SendClientMessage(strval(cmd),0x119900AA,tmp);
GameTextForPlayer(playerid,"~g~Success",4000,6);
return 1;
}
if(strcmp(cmd, "/slap", true) == 0)
{
if(level <= 3) return 0; //must delete ! (dont have admin levels !!)
if(pInfo[playerid][Logged] != 1)
return 0;
cmd = strtok(cmdtext, x);
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* Syntax: /slap [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return RtnError(playerid, 0xFF0000AA, "* Jinkies! You entered an invalid playerid dude!");
new Float:Pos[3];
GetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]);
SetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]+30);
format(tmp,sizeof(tmp),"* You have successfully slapped %s out of the sky!",Name(strval(cmd)));
SendClientMessage(playerid,0x119900AA,tmp);
format(tmp,sizeof(tmp),"* Admin[%s] has just slapped you from your position!",Name(playerid));
SendClientMessage(strval(cmd),0x119900AA,tmp);
GameTextForPlayer(playerid,"~g~Success",4000,6);
return 1;
}
if(strcmp(cmd, "/mute", true) == 0)
{
if(level <= 1) return 0; //must delete ! (dont have admin levels !!)
if(pInfo[playerid][Logged] != 1)
return 0;
cmd = strtok(cmdtext, x);
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* Syntax: /mute [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return RtnError(playerid, 0xFF0000AA, "* Jinkies! You entered an invalid playerid dude!");
pInfo[strval(cmd)][Mute] = 1;
format(tmp,sizeof(tmp),"* You have successfully muted %s!",Name(strval(cmd)));
SendClientMessage(playerid,0x119900AA,tmp);
format(tmp,sizeof(tmp),"* Admin[%s] has muted you!",Name(playerid));
SendClientMessage(strval(cmd),0x119900AA,tmp);
GameTextForPlayer(playerid,"~g~Success",4000,6);
return 1;
}
if(strcmp(cmd, "/unmute", true) == 0)
{
if(level <= 1) return 0; //must delete ! (dont have admin levels !!)
if(pInfo[playerid][Logged] != 1)
return 0;
cmd = strtok(cmdtext, x);
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* Syntax: /unmute [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return RtnError(playerid, 0xFF0000AA, "* Jinkies! You entered an invalid playerid dude!");
pInfo[strval(cmd)][Mute] = 0;
format(tmp,sizeof(tmp),"* You have successfully unmuted %s!",Name(strval(cmd)));
SendClientMessage(playerid,0x119900AA,tmp);
format(tmp,sizeof(tmp),"* Admin[%s] has unmuted you!",Name(playerid));
SendClientMessage(strval(cmd),0x119900AA,tmp);
GameTextForPlayer(playerid,"~g~Success",4000,6);
return 1;
}
if(strcmp(cmd, "/explode", true) == 0)
{
if(pInfo[playerid][Logged] != 1)
return 0;
cmd = strtok(cmdtext, x);
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* Syntax: /explode [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return RtnError(playerid, 0xFF0000AA, "* Jinkies! You entered an invalid playerid dude!");
new Float:Pos[3];
GetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]);
SetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]);
CreateExplosion(Pos[0],Pos[1],Pos[2],1,40);
format(tmp,sizeof(tmp),"* You blew %s into a pixillion pieces!",Name(strval(cmd)));
SendClientMessage(playerid,0x119900AA,tmp);
format(tmp,sizeof(tmp),"* Admin[%s] has blown you to pixillion pieces!",Name(playerid));
SendClientMessage(strval(cmd),0x119900AA,tmp);
GameTextForPlayer(playerid,"~g~Success",4000,6);
return 1;
}
plz reply and fixx plzzz ;pp