lincon = AddStaticVehicleEx(411,-2251.1990,2329.9397,4.5178,89.5207,0,0,50) PutPlayerInVehicle(playerid, lincon,0); noevento[playerid] = 1; TogglePlayerControllable(playerid, 0); }
CMD:ircordenada(playerid,params[])
{
new Float:X,Float:Y,Float:Z;
if(sscanf(params,"fff",X,Y,Z)) return SendClientMessage(playerid,-1,"Use /ircordenada [X][Y][Z]");
SetPlayerPos(playerid,X,Y,Z);
return 1;
}
if(sscanf(cmdtext,"fff",X,Y,Z)) return SendClientMessage(playerid,-1,"Use /ircordenada [X][Y][Z]");
if(strcmp(cmd, "/irpos", true) == 0)
{
if(Player[playerid][pAdmin] < 3)
return SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem permissгo para usar este comando!");
new Float:X,Float:Y,Float:Z;
new tmp[24], idx; tmp = strtok(params, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GREY, "[USO] Digite as coordenadas");
X = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GREY, "[USO] Digite Y");
Y = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, COLOR_GREY, "[USO] Digite Z");
Z = strval(tmp);
SetPlayerPos(playerid, X,Y,Z);
SendClientMessage(playerid, -1, "[INFO] Vocк foi teleportado.");
SetPlayerInterior(playerid,0);
Player[playerid][pInt] = 0;
return 1;
}
PHP код:
undefinide simbol params |
if(strcmp(cmd, "/irpos", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new Float:Coordenada[3];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Use /irpos [X][Y][Z]");
Coordenada[0] = floatstr(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Use /irpos [X][Y][Z]");
Coordenada[1] = floatstr(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Use /irpos [X][Y][Z]");
Coordenada[2] = floatstr(tmp);
SetPlayerPos(playerid,Coordenada[0],Coordenada[1],Coordenada[2]);
SendClientMessage(playerid, 0x33CCFFAA, "[Server Info] Vocк foi atй as coordenadas indicadas !");
}
return true;
}