so ist der befehl jetzt gearde:
if(strcmp(cmd, "/wegcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /wegcar [carid]");
return 1;
}
if (!PlayerToPoint(9.0, playerid,831.3549,-1203.8730,16.9766))
{
SendClientMessage(playerid, COLOR_RED, "Du Bist nicht im i um das zu machen");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = strval(tmp);
if (PlayerInfo[playerid][pLeader] == 24)
{
//if (AttachTrailerToVehicle(int trailerid, int vehicleid))
//{
GetPlayerPos(playerid, plocx, plocy, plocz);
SetVehiclePos(plo,900.3557,-1178.5105,6.2734);
//}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein O-Amt");
}
}
return 1;
}
und jetzt ist es so:
wenn ich im i stehe und /wegcar spawnid mache kann ich es weg porten an ein geheimen ort wo nur o-amt hin kommt das keiner das fahrzeug raus hollen kann.
Aber das problem ist nun wenn ich /wegcar spawnid mache kann ich jede id nemen auch ein car wo nicht da am i steht aber ich will das so haben das nur das car wo auch am i ist weg gespawnt wird wenn man die spawnid nimmt geht das?
für o-amt habe ich ein befehl /spawnid
dan sieht man die spawnid