10.01.2010, 13:42
10.01.2010, 14:29
You need to have this
before you use "giveplayerid"
So put that at thetop ofyour command and you should be ok
Код:
tmp = strtok(cmdtext, idx); giveplayerid = strval(tmp);
So put that at thetop ofyour command and you should be ok
10.01.2010, 16:05
you need to add if(IsPlayerConnected(giveplayerid)) too
11.01.2010, 13:00
http://platzii.com/pastebin/111
it sends me those lines in chat:
when i type /sellgun 0 mp5
it sends me those lines in chat:
Код:
SendClientMessage(playerid, COLOR_WHITE, "*** Sell Guns ***");
SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellgun [id] [gun]");
SendClientMessage(playerid, COLOR_GREY, "AVAILABLE GUNS**:mp5, m4, deagle, shotgun, ak47, 9mm");
SendClientMessage(playerid, COLOR_GREY, "ERROR: Wrong ID OR WRONG WEAPON NAME");
12.01.2010, 12:32
bump
12.01.2010, 14:56
Код:
if(strcmp(cmd, "/sellgun", true) == 0) {
GetPlayerPos(giveplayerid,px,py,pz);
tmp = strtok(cmd, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_GREEN, "________________________________________________");
SendClientMessage(playerid, COLOR_WHITE, "*** Sell Guns ***");
SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellgun [id] [gun]");
SendClientMessage(playerid, COLOR_GREY, "AVAILABLE GUNS**:mp5, m4, deagle, shotgun, ak47, 9mm");
SendClientMessage(playerid, COLOR_GREEN, "________________________________________________");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID) {
x_info = strtok(cmd, idx);
if(!strlen(x_info)) {
SendClientMessage(playerid, COLOR_GREEN, "________________________________________________");
SendClientMessage(playerid, COLOR_WHITE, "*** Sell Guns ***");
SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellgun [id] [gun]");
SendClientMessage(playerid, COLOR_GREY, "AVAILABLE GUNS**:mp5, m4, deagle, shotgun, ak47, 9mm");
SendClientMessage(playerid, COLOR_GREY, "ERROR: Wrong ID OR WRONG WEAPON NAME");
SendClientMessage(playerid, COLOR_GREEN, "________________________________________________");
return 1;
}
}
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)

