Help..How to??
#3

Can example do

public Command(playerid, cmdtext[])
{
if (strcmp(cmd, "/drugtest", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "KORISTI: /drugtest [playerid/Dio Imena]");
return 1;
}
giveplayerid = ReturnUser(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(GetDistanceBetweenPlayers(playerid,giveplayerid ) < 3)
{
if(PlayerStoned[playerid] >= 1)
{
format(string, sizeof(string), "* %s je dao test na drogu igracu,a %s ga je stavio u usta.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Test na dorgu: Nadrogiran **");
GameTextForPlayer(playerid,"~w~Ovaj igrac je~n~~r~nadrogiran", 8000, 1);
return 1;
}
else
{
format(string, sizeof(string), "* %s je dao test na drogu igracu,a %s ga je stavio u usta.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Test na dorgu: Nije Nadrogiran **");
GameTextForPlayer(playerid,"~w~Ovaj igrac~n~~r~nije nadrogiran", 8000, 1);
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Igrac je offline !");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nisi ovlasten koristiti ovu komandu! (Cops Only)");
}
}
return 1;
}
or just

public Command() //without playerid and cmdtext[]
?
Reply


Messages In This Thread
Help..How to?? - by Cro_Haxor - 17.05.2011, 12:19
Re: Help..How to?? - by [Lsgw]LoL - 17.05.2011, 12:21
Re: Help..How to?? - by Cro_Haxor - 17.05.2011, 12:27
Re: Help..How to?? - by [Lsgw]LoL - 17.05.2011, 12:35
Re: Help..How to?? - by Sasino97 - 17.05.2011, 12:48
Re: Help..How to?? - by xDeadlyBoy - 17.05.2011, 12:53

Forum Jump:


Users browsing this thread: 1 Guest(s)