19.11.2014, 21:11
Good evening and hello to everyone, so Im facing this problem right now and I dont know what I did wrong, here it is:
So Im using this:
to prevent players from using my car for example.
But when I use the same code under OnPlayerRequestSpawn to prevent players from spawning with my skin, it does nothing?
(Im locking them by this way cause I want to lock two same skin ids for different players)
I have added this also:
and
I've did it before and it was working, but since I stopped SA:MP for over a year I've forgotten many things, maybe Im forgotting something or it shouldn't be done this way ? Thanks in advance, everyone who atleast tries to help will get repped for sure!
So Im using this:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) { new CarCheck = GetPlayerVehicleID(playerid); if(CarCheck == dizzlecar) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName)); if(strcmp(pName,"Dizzle") == 0) { SendClientMessage(playerid,-1,"Welcome back!"); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,COLOR_ERROR,"You have the right to get out of Dizzle's car, punk!"); } } }
But when I use the same code under OnPlayerRequestSpawn to prevent players from spawning with my skin, it does nothing?
(Im locking them by this way cause I want to lock two same skin ids for different players)
Код:
public OnPlayerRequestSpawn(playerid) { new SkinCheck = GetPlayerSkin(playerid); if(SkinCheck == dizzleskin) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); if(strcmp(pName, "Dizzle", false) == 0) { SendClientMessage(playerid, 0x00FF00AA, "Welcome back!"); } else { SendClientMessage(playerid, 0xFF0000AA, "This skin is locked for Dizzle only."); return 0; } }
Код:
new dizzleskin;
Код:
dizzleskin=AddPlayerClass(blah blah my skin id and spawn pos etc.)
