18.01.2015, 10:36
I want to create a promote command.
I was looking at a kick command and tried to create a promote command from it.
this is my code:
Error:
I was looking at a kick command and tried to create a promote command from it.
this is my code:
Код:
#include <a_samp> #include <zcmd> public OnPlayerCommandText(playerid, cmdtext[]) { CMD:giverights(playerid, pRights) { if(PlayerInfo[playerid][pRights] == 3) { new target; new rights[64]; new str[128]; new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; GetPlayerName(playerid, Adminname, sizeof(Adminname)); GetPlayerName(target, Playername, sizeof(Playername)); if(sscanf(params, "us[64]", target,rights)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]"); if(!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!"); PlayerInfo[target][pRights] = rights; } } }
Код:
C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : error 029: invalid expression, assumed zero C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : error 017: undefined symbol "cmd_giverights" C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : error 029: invalid expression, assumed zero C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : fatal error 107: too many error messages on one line