27.03.2010, 16:28
You can do it with a global variable. Example :
Код:
//It will store the players' skin new iPlayerSkin[ MAX_PLAYERS ]; public OnPlayerCommandText( playerid, cmdtext[ ] ) { if( strcmp( "/onduty", cmdtext, true ) == 0 ) { //Store the actual skin iPlayerSkin[ playerid ] = GetPlayerSkin( playerid ); //Other codes... ( for example SetPlayerSkin... ) return 1; } if( strcmp( "/offduty", cmdtext, true ) == 0 ) { //Load the stored skin SetPlayerSkin( playerid, iPlayerSkin[ playerid ] ); return 1; } return 0; }