06.06.2013, 20:07
Hello.
Im trying to create a /policepark system but there is a problem with one system.
GetVehicleModel.
This is what it shows afterwards.
Im trying to create a /policepark system but there is a problem with one system.
GetVehicleModel.
pawn Код:
CMD:policepark(playerid, parmas[])
{
if(IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 2 || ModDuty[playerid] == 1)
{
new veh = GetPlayerVehicleID(playerid);
new cm = GetVehicleModel(veh);
new
Float:a,
string[180],
Float:dPos[4],
cowner = CarInfo[veh][cUid]
;
SCM(playerid, -1, "Passes");
format(string, sizeof(string),"Vehicle name = %s",GetVehicleModel(veh));
SCM(playerid, -1, string);
GetVehiclePos(veh, dPos[0], dPos[1], dPos[2]);
GetVehicleZAngle(veh, a);
if(cm == PlayerInfo[cowner][pPcarkey])
{
PlayerInfo[cowner][pC1X] = dPos[0];
PlayerInfo[cowner][pC1Y] = dPos[1];
PlayerInfo[cowner][pC1Z] = dPos[2];
PlayerInfo[cowner][pC1A] = a;
SCM(playerid, -1, "Debug Test");
}
else if(cm == PlayerInfo[cowner][pPcarkey2])
{
PlayerInfo[cowner][pC2X] = dPos[0];
PlayerInfo[cowner][pC2Y] = dPos[1];
PlayerInfo[cowner][pC2Z] = dPos[2];
PlayerInfo[cowner][pC2A] = a;
SCM(playerid, -1, "Debug Test");
}
else if(cm == PlayerInfo[cowner][pPvipcar])
{
PlayerInfo[cowner][pC3X] = dPos[0];
PlayerInfo[cowner][pC3Y] = dPos[1];
PlayerInfo[cowner][pC3Z] = dPos[2];
PlayerInfo[cowner][pC3A] = a;
SCM(playerid, -1, "Debug Test");
}
else
{
SCM(playerid, COLOR_WHITE, " You can only park your own car.");
}
}
return 1;
}
Код:
[16:02:36] Passes [16:02:36] Vehicle name = !licepark [16:02:36] Debug Test