11.10.2017, 17:36
Hello again, second post today, I'm trying to put this in my gamemode:
When compiling I get one error:
Line 2324 has nothing t do with the code I'm trying to put in...
Line 2324 and on:
It's behing public CountDown.
Thanks
PHP код:
if(strcmp("/tp", cmd, true) == 0)
{
if(IsPlayerAdmin(playerid)) {
new temp[256], player, Float:X, Float:Y, Float:Z, carid, seat;
player = strval(temp);
GetPlayerPos(player, X, Y, Z);
if(IsPlayerInAnyVehicle(playerid)){
carid = GetPlayerVehicleID(playerid);
seat = GetPlayerVehicleSeat(playerid);
SetVehiclePos(carid, X+1, Y, Z);
PutPlayerInVehicle(playerid, carid, seat);
return 1;
}
SetPlayerPos(playerid, X+1, Y, Z);
return 1;
}
else{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are not authorized to use this command.");
return 1;
}
}
if(strcmp("/get", cmd, true) == 0)
{
if(IsPlayerAdmin(playerid)) {
new temp[256], player, Float:X, Float:Y, Float:Z, carid, seat;
player = strval(temp);
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInAnyVehicle(player)){
carid = GetPlayerVehicleID(player);
seat = GetPlayerVehicleSeat(player);
SetVehiclePos(carid, X+1, Y, Z);
PutPlayerInVehicle(player, carid, seat);
return 1;
}
SetPlayerPos(player, X+1, Y, Z);
return 1;
}
else{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are not authorized to use this command.");
return 1;
}
}
When compiling I get one error:
Код:
:\1.Iсigo\GTA\GTA SA\3. SERVER TOOLS\GM\Original\2 con armacol\SERVER.pwn(2324) : error 021: symbol already defined: "strtok" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Line 2324 and on:
PHP код:
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
Thanks