29.01.2010, 15:34
Try this (Not Tested):
pawn Код:
if(!strcmp(cmdtext,"/opengate",true))
{
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(strcmp(PlayerName,"PlayerNameHERE",true))
{
MoveObject(GATE, X,Y,Z,Speed);
}
else SendPlayerFormattedText(playerid,"You not is PLAYERNAME",0);
return 1;
}
if(!strcmp(cmdtext,"/close",true))
{
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(strcmp(PlayerName,"PlayerNameHERE",true))
{
MoveObject(GATE, X,Y,Z,Speed);
}
else SendPlayerFormattedText(playerid,"You not is PLAYERNAME",0);
return 1;
}