10.10.2015, 20:58
Have problem with privatecars.pwn my own
10.10.2015, 21:06
(
Последний раз редактировалось Unte99; 11.10.2015 в 15:15.
)
Show us some code. You are giving us nothing to work with.
By the way, use [ code ]TEXT[ /code ] (without spaces) for code and errors.
By the way, use [ code ]TEXT[ /code ] (without spaces) for code and errors.
11.10.2015, 11:09
*looks at his magic ball*
Yeah, still can't guess the code to fix.
Yeah, still can't guess the code to fix.
11.10.2015, 18:43
Код:
// PRIVATE CARS SCRIPT MADE BY Wolf_Lv #include <a_samp> new privatecar; public OnFilterScriptInit () { privatecar = CreateVehicle(400, 0, 0, 0, 0, 1, 1, 86000); return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { new vehicleid = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER) { if(vehicleid == privatecar) { if(strcmp(GetName(playerid), "Wolf_Lv", true) { return 1; } else { RemovePlayerFromVehicle(playerid); } } } return 1; } stock GetName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof name); return name; }
11.10.2015, 18:51
PHP код:
if(strcmp(GetName(playerid), "Wolf_Lv", true) //look
if(strcmp(GetName(playerid), "Wolf_Lv", true))
11.10.2015, 19:21
Need make it or replace it?
11.10.2015, 19:22
replace
you see a mistake or not ?
PHP код:
if(strcmp(GetName(playerid), "Wolf_Lv", true) //error
if(strcmp(GetName(playerid), "Wolf_Lv", true)) //ok
11.10.2015, 19:25
Thank you, worked
11.10.2015, 19:30
The function you are using will remove the player from the vehicle if the name is Wolf_Lv, and will let the player enter if the name is different from Wolf_Lv,
You should use this one instead:
You should use this one instead:
PHP код:
if(!strcmp(GetName(playerid), "Wolf_Lv", true))
11.10.2015, 19:41
Also, the ignorecase parameter should be false, because another player with nickname WOLF_LV could drive the car also.
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)