help me -
MORJAN1122 - 25.01.2014
HI whene i want to write cmd in my server i write it and nothing happend mybe that is plugin
note: in all commands same bug
pls help fast
this is one coommand:
Код:
COMMAND:setlevel(playerid,params[])
{
if(!AdminCommandCheck(playerid,"/setlevel"))
return 1;
new id,level;
if(sscanf(params,"ui",id,level))
return SendSyntaxWarning(playerid,"/setLevel <ID/Name> <Level>");
if(!IsValidPlayer(id) || level<0)
return SendSyntaxWarning(playerid,"/setlevel <ID/Name> <Level>");
if(PlayerInfo[pLoggedIn][id])
{
if(PlayerInfo[pAdminLevel][id]<PlayerInfo[pAdminLevel][playerid] || IsPlayerAdmin(playerid))
{
new string[128],string_en[128];
if(id!=playerid)
{
format(string,sizeof(string),"<$> -Admininfo-<#> Admin %s hat %s auf Adminlevel %d gestuft!",GetPlayerString(playerid),GetPlayerString(id),level);
format(string_en,sizeof(string_en),"<$> -Admininfo-<#> Admin %s has leveled %s to adminlevel %d!",GetPlayerString(playerid),GetPlayerString(id),level);
SendAdminMessage(COLOR_ADMIN,string,string_en,1,id);
if(GetPlayerLanguage(id)==LANG_DE)
format(string,sizeof(string),"<$> -Admininfo-<#> Du wurdest von Admin %s auf Adminlevel %d gestuft!",GetPlayerString(playerid),level);
else
format(string,sizeof(string),"<$> -Admininfo-<#> Admin %s has leveled you to adminlevel %d!",GetPlayerString(playerid),level);
SendClientMessageEx(id,COLOR_ADMIN,string);
}
else
{
format(string,sizeof(string),"<$> -Admininfo-<#> Admin %s hat sich auf Adminlevel %d gestuft!",GetPlayerString(playerid),level);
format(string_en,sizeof(string_en),"<$> -Admininfo-<#> Admin %s has leveled himself to adminlevel %d!",GetPlayerString(playerid),level);
SendAdminMessage(COLOR_ADMIN,string,string_en,1,INVALID_PLAYER_ID);
}
printf("[Level] %s hat %s auf Level %d gestuft!",PlayerName[playerid],PlayerName[id],level);
PlayerInfo[pAdminLevel][id]=level;
DOF_SetInt(DOF_File(PlayerName[id]),"level",level);
}
else
SendLanguageMessage(playerid,COLOR_WARNING,"<$> -Warnung-<#> Du kannst das Adminlevel dieses Admins nicht veraendern!","<$> -Warning-<#> You can't change the adminlevel of this admin!");
}
else
SendLanguageMessage(playerid,COLOR_WARNING,"<$> -Warnung-<#> Dieser Spieler ist entweder nicht registriert oder nicht eingeloggt!","<$> -Warning-<#> This player is not registered or logged in!");
return 1;
}
Re : help me = rep fast -
MCZOFT - 25.01.2014
use
sscanf2 and ZCMD
#include <sscanf2>
#include <ZCMD>
PHP код:
cmd:setlevel(playerid,params[])
{
if(!AdminCommandCheck(playerid,"/setlevel"))
return 1;
new id,level;
if(sscanf(params,"ui",id,level))
return SendSyntaxWarning(playerid,"/setLevel <ID/Name> <Level>");
if(!IsValidPlayer(id) || level<0)
return SendSyntaxWarning(playerid,"/setlevel <ID/Name> <Level>");
if(PlayerInfo[pLoggedIn][id])
{
if(PlayerInfo[pAdminLevel][id]<PlayerInfo[pAdminLevel][playerid] || IsPlayerAdmin(playerid))
{
new string[128],string_en[128];
if(id!=playerid)
{
format(string,sizeof(string),"<$> -Admininfo-<#> Admin %s hat %s auf Adminlevel %d gestuft!",GetPlayerString(playerid),GetPlayerString(id),level);
format(string_en,sizeof(string_en),"<$> -Admininfo-<#> Admin %s has leveled %s to adminlevel %d!",GetPlayerString(playerid),GetPlayerString(id),level);
SendAdminMessage(COLOR_ADMIN,string,string_en,1,id);
if(GetPlayerLanguage(id)==LANG_DE)
format(string,sizeof(string),"<$> -Admininfo-<#> Du wurdest von Admin %s auf Adminlevel %d gestuft!",GetPlayerString(playerid),level);
else
format(string,sizeof(string),"<$> -Admininfo-<#> Admin %s has leveled you to adminlevel %d!",GetPlayerString(playerid),level);
SendClientMessageEx(id,COLOR_ADMIN,string);
}
else
{
format(string,sizeof(string),"<$> -Admininfo-<#> Admin %s hat sich auf Adminlevel %d gestuft!",GetPlayerString(playerid),level);
format(string_en,sizeof(string_en),"<$> -Admininfo-<#> Admin %s has leveled himself to adminlevel %d!",GetPlayerString(playerid),level);
SendAdminMessage(COLOR_ADMIN,string,string_en,1,INVALID_PLAYER_ID);
}
printf("[Level] %s hat %s auf Level %d gestuft!",PlayerName[playerid],PlayerName[id],level);
PlayerInfo[pAdminLevel][id]=level;
DOF_SetInt(DOF_File(PlayerName[id]),"level",level);
}
else
SendLanguageMessage(playerid,COLOR_WARNING,"<$> -Warnung-<#> Du kannst das Adminlevel dieses Admins nicht veraendern!","<$> -Warning-<#> You can't change the adminlevel of this admin!");
}
else
SendLanguageMessage(playerid,COLOR_WARNING,"<$> -Warnung-<#> Dieser Spieler ist entweder nicht registriert oder nicht eingeloggt!","<$> -Warning-<#> This player is not registered or logged in!");
return 1;
}
Re: help me = rep fast -
MORJAN1122 - 25.01.2014
NOt work have more errors
Re : help me = rep fast -
MCZOFT - 25.01.2014
if you dont mind , post them
Re: help me = rep fast -
MORJAN1122 - 25.01.2014
that it is all cmds
Re : help me -
MCZOFT - 25.01.2014
post for me the errors man ... not the commands