04.03.2009, 20:12
hello,
i am having a problem with adding a new command.
i already have this, and this works:
but how can i this into there now?:
i just started a new server, so this are the only commands in this script from now. i hope you can help me.
thuron
i am having a problem with adding a new command.
i already have this, and this works:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/fix",true)) {
if(IsPlayerAdmin(playerid) && IsPlayerInAnyVehicle(playerid)) {
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
} else {
SendClientMessage(playerid,COLOR_CRED,"You must be an administrator AND be inside a vehicle to use this command.");
}
return 1;
}
return 0;
}
Код:
if(!strcmp("/Enter", cmdtext, true) && PlayerToPoint(1.5 ,playerid,252.8745,-92.3390,3.5354))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,262.1704,-84.3840,65.1329);
CreatePickup(1239,2,252.8745,-92.3390,3.5354);
return 1;
}
if(!strcmp("/Exit", cmdtext, true) && PlayerToPoint(1.5 ,playerid,262.1704,-84.3840,65.1329))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,252.8745,-92.3390,3.5354);
return 1;
}
return 0;
}
thuron


