hi help me please
#1

I got this cmd here

Код:
if(CarID == car1)
{
new PlayerName1[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName1, sizeof(PlayerName1));
if(strcmp(PlayerName1, "Melinda_Dawson", true) == 0)
{
SendClientMessage(playerid, RED,"Hey, welcome");
}
else
{
SendClientMessage(playerid, RED, "You do not have the keys to this car");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X+2, Y+2, Z+2);
}
}
it's working fine for me, but I need so it can be used to a name more "Henrik_white" could anyone help me please
Reply
#2

How do you mean? If you mean that only Melinda_Dawson and Henrik_White can enter the car then use this:

Код:
if(CarID == car1)
{
new PlayerName1[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName1, sizeof(PlayerName1));
if(strcmp(PlayerName1, "Melinda_Dawson", true) == 0)
{
SendClientMessage(playerid, RED,"Hey, welcome");
}
else if(strcmp(PlayerName1, "Henrik_White", true) == 0)
{
SendClientMessage(playerid, RED,"Hey, welcome");
}
else
{
SendClientMessage(playerid, RED, "You do not have the keys to this car");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X+2, Y+2, Z+2);
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)