19.06.2018, 04:09
Pawno give me warning:error 033: array must be indexed (variable "text")
I want to check string is same
Please tell me how do I do that.
I want to check string is same
Please tell me how do I do that.
Код:
TeleportPlayer(playerid, Float:x, Float:y, Float:z, Float:a, interiorid = 0, worldid = 0, text[] = "", freeze = 0)//非常重要的 { SetPlayerInterior(playerid, interiorid); SetPlayerVirtualWorld(playerid, worldid); SetCameraBehindPlayer(playerid); SetPVarInt(playerid,"IIH",0); if( IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(playerid); foreach(new i : Player) { if( GetPlayerVehicleID(i) == vehicleid && i != playerid) { SetPlayerInterior(i, interiorid); SetPlayerVirtualWorld(i, worldid); } if(GIV(playerid)==0){LinkVehicleToInterior(vehicleid, interiorid);} SetVehicleVirtualWorld(vehicleid, worldid); SetVehiclePos(vehicleid, x, y, z); SetVehicleZAngle(vehicleid, a); } } else { SetPlayerPos(playerid, x, y, z); if(a != 0){SetPlayerFacingAngle(playerid, a);} } if(freeze==1){Freeze(playerid);} if(text!="none")//This line warning!!! { new string[128], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); format(string, sizeof(string), text, pName); SendClientMessageToAll(ServerColors[random(sizeof(ServerColors))], string); } return 1; }