Give command
#1

fixed
Reply
#2

You only have two parameters set? pid and Thing.

What are you meant to be giving here?
Reply
#3

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
You only have two parameters set? pid and Thing.

What are you meant to be giving here?
Player id and thing to give
Reply
#4

The following errors occurred with your submission:
The message you have entered is too short. Please lengthen your message to at least 4 characters.

Quote:

CMD:give(playerid, params[])
{
if(pData[playerid][Admin] >= 3)
{
new pid;
new str[250];
if(sscanf(params, "us[64]", pid, params)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "USAGE: /give [Player ID] [Any Thing]");
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "PlayerID is not connected.");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
PlayerPlaySound(pid, 1057, 0.0, 0.0, 0.0);
format(str, sizeof(str), "* Admin %s (ID:%d) gave %s (ID: %d) %s",GetName(playerid),playerid,GetName(pid),pid,pa rams);
SendClientMessageToAll(0xB9FF00FF, str);
format(str,sizeof(str),"~g~~h~%s",params);
GameTextForPlayer(pid,str,3000,4);
new irc[130];
format(irc,sizeof(str),"0,13* Admin %s (ID:%d) gave %s (ID: %d) %s",GetName(playerid), playerid, GetName(pid),pid,params);
IRC_GroupSay(groupID, IRC_CHANNEL, irc);
return 1;
}
else return ShowMessage(playerid,COLOR_YELLOW,1,3);
}

Reply
#5

You didn't give any string size to Thing.

Change
new Thing;
to
new Thing [64];
Reply
#6

Whatever you do with CMD:***( playerid, params[] )

Always follow this method, otherwise you will get errors with " Unknown command ".
Код:
CMD:commandname( playerid, params[] )
{
.....
...
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)