PDA

View Full Version : For One player


alishvasis
13/02/2014, 08:14 PM
How To Set a Command For One player ?
Example Set /ban Command Just For Killer_R Player in Game

Help Me TnX




Sry For My Bad English

Flake.
13/02/2014, 08:32 PM
new namee[20 char];
GetPlayerName(playerid, namee, sizeof(namee));
if(!strcmp("Flake", namee, true))
{
// Rest of ban cmd
} else return SendClientMessage(playerid, 0xFFFFFFFF, "Your name isn't Flake!");


Try that

Don_Cage
13/02/2014, 08:33 PM
if(strcmp(cmd,"/command", true) == 0)
{
new name[24];
GetPlayerName(playerid,name,sizeof(name));
if(!strcmp(name,"Killer_R"))
{
//code...

alishvasis
13/02/2014, 09:00 PM
new namee[20 char];
GetPlayerName(playerid, namee, sizeof(namee));
if(!strcmp("Flake", namee, true))
{
// Rest of ban cmd
} else return SendClientMessage(playerid, 0xFFFFFFFF, "Your name isn't Flake!");


Try that

TnXXxx + Rep

alishvasis
13/02/2014, 09:05 PM
if(strcmp(cmd,"/command", true) == 0)
{
new name[24];
GetPlayerName(playerid,name,sizeof(name));
if(!strcmp(name,"Killer_R"))
{
//code...

TnxXXxxX + Rep