13.07.2013, 10:26
Hello everyone i want to help for just playing with the keys script or tutorial on mysql
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (playeradmin[playerid]//If player is admin { GameTextForPlayer(playerid, "~w~Yea you are admin!",5000,1);//Show text for player if (newkeys)//if any button pressed from this site which are described https://sampwiki.blast.hk/wiki/Keys { GameTextForPlayer(playerid, "~w~Yea you are admin and you pressed button!",5000,1);//Show text } } } |
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (PlayerIsCop[playerid]/If player is Cop { GameTextForPlayer(playerid, "~w~Yea you are Cop!",5000,1);//Show text for player if (newkeys == KEY_CROUCH )//Is shows how to use buttons KEY_CROUCH is c button { GameTextForPlayer(playerid, "~w~Yea you are Cop and pressed C button!",5000,1);//Show text for player } } } |