setweaponskill problem
#3

Quote:

PAWN Code:

if(strcmp(cmd, "/wskill", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "VERWENDE: /wskill [SpielerID] [Waffe 0-10] [WaffenSkill 0-999]");
SendClientMessage(playerid, COLOR_WHITE, " [0=Pistol, 1=SPistol, 2=Eagle, 3=Shotgun, 4=SawnOff,");
SendClientMessage(playerid, COLOR_WHITE, " 5=Combat, 6=Mac10, 7=MP5, 8=AK47, 9=M4, 10=Sniper]");
return 1;
}
new playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "VERWENDE: /wskill [SpielerID] [Waffe 0-10] [WaffenSkill 0-999]");
SendClientMessage(playerid, COLOR_WHITE, " [0=Pistol, 1=SPistol, 2=Eagle, 3=Shotgun, 4=SawnOff,");
SendClientMessage(playerid, COLOR_WHITE, " 5=Combat, 6=Mac10, 7=MP5, 8=AK47, 9=M4, 10=Sniper]");
return 1;
}
new skill = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "VERWENDE: /wskill [SpielerID] [Waffe 0-10] [WaffenSkill 0-999]");
SendClientMessage(playerid, COLOR_WHITE, " [0=Pistol, 1=SPistol, 2=Eagle, 3=Shotgun, 4=SawnOff,");
SendClientMessage(playerid, COLOR_WHITE, " 5=Combat, 6=Mac10, 7=MP5, 8=AK47, 9=M4, 10=Sniper]");
return 1;
}
new level = strval(tmp);
if(IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(playa))
{
SetPlayerSkillLevel(playa, skill, level);
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
}
return 1;
}


yeah thats it^^

thank you
Reply


Messages In This Thread
setweaponskill problem - by wesone - 27.03.2010, 14:09
Re: setweaponskill problem - by MadeMan - 27.03.2010, 15:42
Re: setweaponskill problem - by wesone - 27.03.2010, 15:47

Forum Jump:


Users browsing this thread: 1 Guest(s)