if(strcmp(cmd, "/open", true) == 0) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if (strcmp(name, "[Mw]drifking", false))
{
if(IsPlayerInRangeOfPoint(playerid, 11.0, 1497.19000000,-710.91000000,97.61000000))
{
MoveObject(gate, 1497.19000000,-714.91000000,101.61000000,2);//This will move the gate
SendClientMessage(playerid,COLOR_BLUE,"GATE OPENING! (ALERT; ALERT)");//This will send an message announcing the gate Stats!
SetTimer("GateClose", 8000, 0);//This will start the counting till the gate will be closed
}
if(!IsPlayerInRangeOfPoint(playerid, 11.0, 1497.19000000,-710.91000000,97.61000000))
{
SendClientMessage(playerid, COLOR_YELLOW, "You are not close enough to the gate!");
}
}
if (!strcmp(name, "[Mw]drifking", false)){SendClientMessage(playerid,COLOR_BLUE,"You are not allowed to open this gate, sorry!");}
return 1;
}
if(strcmp(cmd, "/open", true) == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if( !strcmp( name, "[Mw]drifking" ) )
{
if(IsPlayerInRangeOfPoint(playerid, 11.0, 1497.19000000,-710.91000000,97.61000000))
{
MoveObject(gate, 1497.19000000,-714.91000000,101.61000000,2);//This will move the gate
SendClientMessage(playerid,COLOR_BLUE,"GATE OPENING! (ALERT; ALERT)");//This will send an message announcing the gate Stats!
SetTimer("GateClose", 8000, 0);//This will start the counting till the gate will be closed
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You are not close enough to the gate!");
}
}
else
{
SendClientMessage(playerid,COLOR_BLUE,"You are not allowed to open this gate, sorry!");
}
return 1;
}
Sorry about my double-post, but i found out that i wanted to use multiple, specific names to be able to open that gate.
If i want Spunky, Airplanesimen and FunKy to be able to open it too, what is needed? |
if( !strcmp( name, "[Mw]drifking" ) || !strcmp( name, "Other_Name" ) || !strcmp( name, "Other_name" ) )