27.01.2013, 13:30
and btw:
sorry for double posting but!
sorry for double posting but!
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/help"))
{
SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_LIGHTERBLUE, "---NEW ERA HELP---");
SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/help");
SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/god");
SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/heal");
SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/repair");
SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
}
if(!strcmp(cmdtext, "/sultan"))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(560, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
return 1;
}
if(!strcmp(cmdtext, "/nrg"))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(522, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
return 1;
}
if(!strcmp(cmdtext, "/cheetah"))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(415, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
return 1;
}
if(!strcmp(cmdtext, "/elegy"))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(562, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
return 1;
}
if(!strcmp(cmdtext, "/dm"))
{
SetPlayerPos(playerid,1397.3000488,-26.0000000,1007.9000244);
SetPlayerInterior(playerid, 1);
return 1;
}
if(!strcmp(cmdtext, "/kill"))
{
SetPlayerHealth (playerid, 0.0);
return 1;
}
if(!strcmp(cmdtext, "/god"))
{
SetPlayerArmour(playerid, 1000000000.0);
SetPlayerHealth(playerid, 1000000000.0);
SendClientMessage(playerid, 0xFFFFFFAA, "God Mode.");
return 1;
}
if(!strcmp(cmdtext, "/heal"))
{
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, 0xFFFFFFAA, "You have been healed.");
return 1;
}
if (strcmp("/goto island", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1046.9867, -2667.2463, 15.0484);
SendClientMessage(playerid, COLOR_RED, "Sent to SARP Island");
SetPlayerInterior(playerid, 0);
return 1;
}
return 0; // if you dont have anithing here
}