strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
//------------------------------[Flip]-----------------------------------------------------------
if(strcmp(cmd, "/flip", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:PX, Float:PY, Float:PZ, Float:PA;
GetPlayerPos(playerid, PX, PY, PZ);
GetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
SetVehiclePos(GetPlayerVehicleID(playerid), PX, PY, PZ+1);
SetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
SendClientMessage(playerid, COLOR_GREEN," Vehicle Succesfully Flipped!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You Are Not An Admin Level 3!");
}
return 1;
}
#pragma unused strtok #pragma tabsize 0
@XoX I've putted on top of my script, but I still get the error. :S
Anyways the line that the error comes on is at the first { |
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
public GateClose6()
{
MoveDynamicObject(bcgate1, 1005.15850830,-2092.55249023,14.94963074, 1,5);
return 1;
}
@rjjj Thank you! It worked!
Anyway I need help to a new thing... :/ It's a gate that i wanna make moveable, and I get this warning: C:\Users\Frede\Desktop\Server\Raven's Roleplay 0.3c\gamemodes\larp.pwn(6942) : warning 202: number of arguments does not match definition And here's the code: pawn Код:
|
MoveDynamicObject(bcgate1, 1005.15850830,-2092.55249023,14.94963074 ,1,5);
MoveDynamicObject(bcgate1, 1005.15850830,-2092.55249023,14.94963074,3);
public GateClose6() { MoveDynamicObject(bcgate1, 1005.15850830,-2092.55249023, 1,5); return 1; }