Quote:
Originally Posted by Gappy
Try something like
pawn Код:
new PasswordScreen[MAX_PLAYERS]; // Top of your script
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/enter", cmdtext, true, 10) == 0) { if(PlayerToPoint(2, playerid, HouseX, HouseY, HouseZ); //fill your house icon co-ords in here { if(IsPlayerAdmin(playerid)) { PasswordScreen[playerid] = 1; SendClientMessage(playerid, YourColorHere, "Press T and type in the password"); } } return 1; } return 0; }
public OnPlayerText(playerid, text[]) { if(PasswordScreen[playerid] == 1) { PasswordScreen[playerid] = 0; if(strcmp(text, "PutThePasswordInHere", 1) == 0) //Fill in the house password { //Password is correct //House stuff goes in here, SetPlayerPos, SetPlayerInterior etc etc } else SendClientMessage(playerid, YourColorHere, "Incorrect Password"); //Password is incorrect return 0; } return 1; }
You will need PlayerToPoint for that, or just edit it to whatever you use for that stuff.
Note: Untested. and indentation looks horrible on the forums.
|
Alrite thanks for that ^^ ill test it out now