11.09.2011, 14:34
quando o kra digita por exemplo /elegy, ele pode criar um monte de elegy, eu queria que tipo, se o kra ta com um /elegy quando ele digitasse /infernus por exemplo, o elegy fosse destruнdo e aparecesse um infernus pro kra..
PAWN:
PAWN:
pawn Код:
if (strcmp(cmdtext, "/elegy", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(562, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/nrg500", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(522, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/infernus", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(411, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/monster", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(444, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/turismo", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(451, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/bmx", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(481, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/supergt", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(506, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/bullet", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(541, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/sultan", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(560, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/flash", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(565, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/savanna", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(567, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/kart", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(571, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/wayfarer", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(586, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/club", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(589, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/cheetah", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(415, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/banshee", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(429, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/canddy", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(457, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/pcj600", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(461, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/faggio", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(462, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/linerunner", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(403, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/sanchez", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(468, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/quad", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(471, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/tropic", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(454, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/sabre", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(475, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/fcr900", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(521, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/vortex", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(539, X, Y, Z, 0.0, -1, -1, -1));
}
if (strcmp(cmdtext, "/bandito", true)==0)
{
new Float:X, Float:Y, Float:Z ;
GetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Cris", CreateVehicle(568, X, Y, Z, 0.0, -1, -1, -1));
}
if(strcmp(cmdtext, "/rc", true, 3) == 0)
{
new vehicleid;
GetPlayerVehicleID(playerid);
if(vehicleid == GetPVarInt(playerid, "Cris"))
{
DestroyVehicle(vehicleid);
DeletePVar(playerid, "Cris");
}
return 1;
}