08.01.2012, 18:47
pawn Код:
if(strcmp(cmd, "/drag", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "** You aren't police {FF0000} Police!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}USAGE:{FF8000}/drag [playerid/PartOfName]");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
new playa;
playa = ReturnUser(tmp);
if(!IsPlayerInVehicle(playa(vehicleid)) // line 15213
{
SendClientMessage(playerid, COLOR_GRAD1, "** Target Must Be On Foot");
return 1;
}
if(IsACopCar(newcar) || IsNgCar(newcar) || IsAnFbiCar(newcar) || IsAHspdCar(newcar))
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playa,x,y,z);
if(PlayerToPoint(5, playerid, x, y, z))
{
PutPlayerInVehicle(playa,newcar,1);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s drags %s to his/her car/moped.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "** Player isn't near you !");
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "** you are not in a Cop Vehicle !");
}
}
return 1;
}
Код:
(15231) : error 012: invalid function call, not a valid address (15231) : error 017: undefined symbol "vehicleid" (15231) : error 029: invalid expression, assumed zero (15231) : fatal error 107: too many error messages on one line