if (!strcmp(cmd, "/pullincar", true)) if(IsACop(playerid) || IsAFreecop(playerid)) { tmp = strtok(cmdtext, idx); if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]"); new person = strval(tmp); tmp = strtok(cmdtext, idx); if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]"); new seat = strval(tmp); new Float:pos[6]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); GetPlayerPos(playerid, pos[3], pos[4], pos[5]); if (floatcmp(floatabs(floatsub(pos[0], pos[3])), 10.0) != -1 && floatcmp(floatabs(floatsub(pos[1], pos[4])), 10.0) != -1 && floatcmp(floatabs(floatsub(pos[2], pos[5])), 10.0) != -1) return false; PutPlayerInVehicle(person, GetPlayerVehicleID(playerid), seat); return 1; }
if (!strcmp(cmd, "/pullincar", true))
{
if(IsACop(playerid) || IsAFreecop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
new person = strval(tmp);
if(person < 0 || person >= MAX_PLAYERS) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
new seat = strval(tmp), Float:pos[3];
GetPlayerPos(person, pos[0], pos[1], pos[2]);
if(GetPlayerDistanceFromPoint(playerid, pos[0], pos[1], pos[2]) > 15.0) return false;
PutPlayerInVehicle(person, GetPlayerVehicleID(playerid), seat);
}
return 1;
}
C:\Users\Administrator\Desktop\East Coast Roleplay\gamemodes\larp.pwn(6785 ![]() |
if (!strcmp(cmd, "/pullincar", true))
{
if(IsACop(playerid) || IsAFreecop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
new person = strval(tmp);
if(person < 0 || person >= MAX_PLAYERS) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
new seat = strval(tmp), Float:pos[3];
GetPlayerPos(person, pos[0], pos[1], pos[2]);
PutPlayerInVehicle(person, GetPlayerVehicleID(playerid), seat);
}
return 1;
}